package com.xiang.controller;

import com.xiang.service.UserService;
import com.xiang.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xiang.clients.InfoClient;


/**
 * @author xiangtianlei
 * @date 2024/04/16
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    InfoClient infoClient;
    @Autowired
    UserService userService;

    @GetMapping("/getUser")
    public AjaxResult getUser() {
        return userService.getUser();
    }

    @GetMapping("/queryUser")
    public AjaxResult queryUser() {
        return userService.getUser();
    }

    @GetMapping("getInfo")
    public AjaxResult getInfo() {
        return infoClient.getInfo();
    }

    @GetMapping("read")
    public AjaxResult read() {
        return AjaxResult.success("read");
    }

    @GetMapping("update")
    public AjaxResult update() {
        return AjaxResult.success("update");
    }
}
